<template>
    <div navigation-component hide-trigger :style="{background: '#1c2b36'}">
        <i-menu :active-name="active" :open-names="['anouce']" @on-select="go" theme="dark" width="220px"  accordion>
            <submenu name="anouce">
                <template slot="title" ><icon type="ios-navigate"/>公告管理</template>
                <menu-item name="/anouce/list">公告列表</menu-item>     
                <menu-item name="/anouce/add">添加公告</menu-item>
            </submenu>
        </i-menu>                                               
    </div>
</template>

<script>
  import store from '../../stores/store'

  export default {
    data(){
        return {
            active:'/anouce/add'
        }
    },
    methods:{
      go(name){
        this.$router.push(name)
      }
    },
    created(){
        this.active = this.$router.currentRoute.path;
    }
  }
</script>

<style scoped>
  [navigation-component] {
      overflow-x: hidden;
  }
</style>